home *** CD-ROM | disk | FTP | other *** search
/ CD-ROM Today - The Disc! 8 / cdrt08.iso / mac / Shareware / HyperCard / demoCdef 120 ƒ / ReadME first!! < prev    next >
Encoding:
Text File  |  1994-12-12  |  3.6 KB  |  104 lines  |  [TEXT/KAHL]

  1. ReadME first!!
  2.  
  3. Ok, what is this stuff?
  4.  
  5. Years ago, I was a mainframe programmer - got tired of Cobol and switched to
  6. database & 4th generation languages.  After I tired of that, I started
  7. programming on the Mac.  I had to teach myself both the Macintosh Toolbox and
  8. "C" at the same time.  One of my primary sources for programming instruction
  9. was other people's code - I constantly cruised the forums on Compuserve and
  10. Genie and downloaded anything that said "source" in the description.
  11.  
  12. This is a small gift in return.  Hopefully, someone, somewhere will learn
  13. something from this collection of odds and ends.
  14.  
  15. Accompanying this note, you should find:
  16.  
  17. 1. A collection of code resources.  Just paste them into the .rsrc files
  18. for your programming projects and use them.  
  19.  
  20. For many details about the CDEF's, how to use them and some programming tips;
  21. read the "About CDEF's" file.
  22.  
  23. 2. A sample of source that demonstrates how to write a simple CDEF.  See the
  24. items with "cdef3D" in their name.  This is the source for the 3D Button CDEF.
  25.  
  26. 2. A demo program project to show the use of the CDEF's.
  27.  
  28. 3. Some utility routines to assist in writing dialog routines.
  29.    They are:
  30.     
  31.     - dialogAssist.c
  32.     - dimText.c
  33.     - movableModal.c
  34.     - panelAssist.c
  35.     - TogLib.c
  36.     
  37.     and matching header files.
  38.  
  39. All of the source & projects are Think C 6.0.1.
  40.     
  41. Here is what the utility routines do - the code is fairly well commented, so
  42. study the code itself.
  43.  
  44. dialogAssist.c/.h
  45. -----------------
  46. I simply got tired of writing pairs of GetDItem()/SetDItem() and similar calls.
  47.  This file is a collection of routines that make one call replacements for
  48. handling controls, keys or the mouse in dialogs.
  49.  
  50. Also, there are some utility routines to do some special dialog handling - like
  51. limiting input length, numeric input, checking for command or option keys or a
  52. "exit" key (enter or escape).
  53.  
  54. There are lots of handy routines in this file, study it to see if there is
  55. anything you can use.
  56.  
  57. dimText.c/.h
  58. ------------
  59.  
  60. These routines were written by JWWalker.  They are used by some of the dialogAssist
  61. routines.
  62.  
  63. To use these routines, do the following:
  64.  
  65. 1. Create your dialog.
  66. 2. Call initDimText(yourDialogPtr) before calling ModalDialog.
  67. 3. Call daDimOne() to dim a text item (edit or static).
  68. 4. Just before calling DisposDialog(), call disposeDimText().
  69.  
  70. Note that if you use AppendDITL or ShortDITL (as in the tab Panel demo), there
  71. are extra calls to be used.  See cdefDemo.c for an example.
  72.  
  73. movableModal.c/.h
  74. -----------------
  75. A set of routines to assist in implementing "Movable Modal" dialogs.  Simply
  76. substitute a call to "ModalDialog" with a call to "movableModal" dialog.  Two
  77. cautions:
  78.  
  79. 1. Use the proper window definition in your dialog resource.
  80. 2. You must have a routine called updateWindow(WindowPtr w) in your code - even
  81. if it just a dummy.  Or, change the source to point to the name of your update
  82. routine.
  83.  
  84. panelAssist.c/.h
  85. ----------------
  86. Two routine to help in implementing tabPanel dialogs.  See the file "About CDEF's".
  87.  
  88. TogLib.c/.h
  89. -----------
  90. Routines to assist in handling "Tog" buttons. See the file "About CDEF's".
  91.  
  92. -------------------------------------------------------------------------------
  93.  
  94. The source & executable code may be freely redistributed as long as all of the
  95. original package is included AND no specific charge is made for the package.
  96.  
  97. The dimText.c/.h files are written by JWWalker.
  98.  
  99. The CDEF's or other code in this package may be incorporated in any freeware, 
  100. shareware, commercial or other software package.
  101.  
  102. -------------------------------------------------------------------------------
  103. Jim Stout - August 1994
  104.